import mountNativeElement from './mountNativeElement'
import isFunction from './isFunction'
import mountComponent from './mountComponent'
export default function mountElement (virtualDOM, container, oldDOM) {
  if (isFunction(virtualDOM)) {
    // component 组件
    mountComponent(virtualDOM, container, oldDOM)
  } else {
    // nativeElement 普通的DOM元素
    mountNativeElement(virtualDOM, container, oldDOM)
  }
}